GCC = g++
CPPFLAGS = -g -finline-functions -Wall -Winline -pipe -DOS_LINUX
HEAD_INFO = -DPROJECT_NAME="\"FASTSEARCH\"" -DDESCRIPTION="\"sse\""
	  
INCLUDES = -I./ -I../../common/commonlib/output/include \
	   -I../../common/protobuf/include \
	   -I../../common/sign/ \
	   -I../../common/ictclas \
	   -I../../common/zero/include \
	   -I../../common/termindex \
	   -I../frame/search_proto/output/include/ \
	   -I../index_merger/output/include \
	   -I../index_reader/output/include \

LIBS     = -L./ -L../../common/commonlib/output/lib -lcommonlib \
	   -L../../common/ictclas -lICTCLAS2011\
	   -L../../common/zero/lib -lzmq\
	   -L../frame/search_proto/output/lib/ -lsearchpb \
	   -L../index_merger/output/lib -lindex_merger \
	   -L../index_reader/output/lib -lindex_reader \
	   ../../common/protobuf/lib/libprotobuf.a \
	   -L../../common/sign/ -lsign\
	   -lpthread

all : sse test_cli

sse : sse_service.o sse_process.o
	$(GCC) -o $@ $^ $(INCLUDES) $(HEAD_INFO) $(LIBS)


test_cli : test_cli.o
	$(GCC) -o $@ $^ $(INCLUDES) $(HEAD_INFO) $(LIBS)

%.o : %.cpp
	$(GCC) $(CPPFLAGS) $(HEAD_INFO) -c $< -o $@ $(INCLUDES)

clean :
	rm -f *.o
	rm -f sse test_cli
	rm -rf output

